package com.hand.springcloud.service;

import com.hand.springcloud.entities.Product;
import org.springframework.stereotype.Component;
import java.util.List;


/**
 * @ Description   :  ProductClientServiceFallBack类，并实现ProductClientService接口
 * @ Author        :  xiong.yilin@hand-china.com
 * @ CreateDate    :  2019/9/9 15:18
 */
//使用 @Component 注解将它注入到容器中
@Component
public class ProductClientServiceFallBack implements ProductClientService{

    @Override
    public Product get(Long id) {
        return new Product(id,"ID="+id+"无数据--Feign & Hystrix","无有效数据库");
    }

    @Override
    public List<Product> list() {
        return null;
    }

    @Override
    public boolean add(Product product) {
        return false;
    }
}
